using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
using UnityEngine;

namespace Tanks.Step4
{
    public struct CannonBall : IComponentData
    {
        public float3 Velocity;
    }

    public class CannonBallAuthoring : MonoBehaviour
    {
        class Baker : Baker<CannonBallAuthoring>
        {
            public override void Bake(CannonBallAuthoring authoring)
            {
                var entity = GetEntity(TransformUsageFlags.Dynamic);
                AddComponent(entity, new CannonBall());

                AddComponent(entity, new URPMaterialPropertyBaseColor());
            }
        }
    }
}